/**
 * TODO
 *
 * @ClassName: UserMapper
 * @author: changhong
 * @since: 2020/5/18 10:28
 */
package life.changhongdeshijie.community.demo.mapper;
import life.changhongdeshijie.community.demo.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Insert("insert into user(name,account_id,token,gmt_create,gmt_modified)values(#{name},#{accountId},#{token},#{gmtCreate},#{gmtModified})")
    void insert(User user);
    @Select("select * from user where token= #{token}")
    User fingByToken(@Param("token") String token);
}
